The rotary position of a servo motor is generally determined with the use of a processing circuit, a light source, such as light emitting diodes (LEDs), a photo detector, and a disc with slots (the combination of these is generally referred to as an optical encoder). The LEDs project light onto the disc as the motor rotates producing an optical pattern that is detected by the photo detector. The photo detector produces signals representing the optical pattern, which are then transmitted to a processing circuit that computes the rotary position of the motor. The accuracy of the encoder affects the accuracy of the servo motor itself. In many applications, knowing the position of the servo motor with a great deal of accuracy is desired. Impairments in the servo motor signals, however, present challenges in computing the position with accuracy. Such impairments may include phase offsets, DC offsets, and/or mismatched amplitudes between two photo detector signals. Conventional systems are not sufficiently accurate to compute the servo motor position when these impairments are present.